package org.wlw.obj;

public class TestFileName {
    public static void main(String[] args) {
        String fn = "y.eah.java";
        //1、找.的位置
        int pos = fn.lastIndexOf(".");
        //2、截取后缀
        System.out.println(fn.substring(pos+1));
    }
}
